import { BRAND_SOURCE_OPTIONS } from '@/constants/commodity';
// 商品信息
const SKU_ORIGINAL_OPTIONS = BRAND_SOURCE_OPTIONS
const goodsInfoColumns = [
  {
    title: '四级类名称',
    key: 'categoryName'
  },
  {
    title: '四级类代码',
    key: 'categoryNo'
  },
  {
    title: '是否敏感',
    key: 'isPriceSensitive'
  },
  {
    title: '是否金属制品',
    key: 'isMetal'
  },
  {
    title: 'SPU码',
    key: 'spuNo'
  },
  {
    title: 'SKU码',
    key: 'skuNo'
  },
  {
    title: '商品名称',
    key: 'productName'
  },
  {
    title: '销售属性',
    key: 'specDetailStr'
  },
  {
    title: '主计量单位',
    key: 'mainUnit'
  },
  {
    title: '数量小数位',
    key: 'mainDecimal'
  },
  {
    title: '商品类型',
    key: 'productType'
  },
  {
    title: '品牌',
    key: 'brandName'
  },
  {
    title: '系列',
    key: 'brandSeries'
  },
  {
    title: '经营模式',
    key: 'dealMode'
  },
  {
    title: '包装清单',
    key: 'packlist'
  },
  {
    title: '商品管理区域',
    key: 'manageArea'
  },
  {
    title: '合作模式',
    key: 'cooperation'
  },
  {
    title: '售价管理周期',
    key: 'sellManagePeriod'
  },
  {
    title: '档次外部定位',
    key: 'outpos'
  },
  {
    title: '档次内部定位',
    key: 'inpos'
  },
  {
    title: '是否季节性商品',
    key: 'seasonProduct'
  },
  {
    title: '囤货期',
    key: 'stockPeriod'
  },
  {
    title: '下架期',
    key: 'soldoutPeriod'
  },
  {
    title: '售卖平台',
    key: 'saleplat'
  },
  {
    title: '归类名称',
    key: 'classificationName'
  },
  {
    title: '税率',
    key: 'taxRate'
  },
  {
    title: '最小起售量（销售）',
    key: 'saleMin'
  },
  {
    title: '销售限制类型（销售）',
    key: 'saleRestrict'
  },
  {
    title: '安全值',
    key: 'safetyRate'
  },
  {
    title: '件装数量',
    key: 'pieceInfo'
  },
  {
    title: '商品条形码',
    key: 'barcode'
  },
  {
    title: '商品信息备注',
    key: 'skuRemark',
  },
  {
    title: '产地',
    key: 'producingAreaName'
  },
  {
    title: 'Sku来源',
    render: (h, { row }) => {
      const result = SKU_ORIGINAL_OPTIONS.find(item => {
        return item.value === row.skuSource;
      });
      return (
        <div>{ result ? result.label : '' }</div>
      )
    }
  },
  {
    title: '来源详情',
    key: 'skuSourceDesc',
  },
]
export {
  goodsInfoColumns
}
